using System;
using System.Collections.Generic;
using System.Text;

namespace XProject.Entity
{
   public class Book
   {
       #region fields
       int id;
       string name;
       string author;
       string publisher;
       int publishYear;
       string description;
       string filename;
    BookCategory category;
       BookShelf shelf;
       byte rank;
       

       #region constructors
       public Book() {
           id = -1;
           name = "";
           author = "";
           publisher = "";
           publishYear = 0;
           description = "";
           filename = "";
           category = new BookCategory();
           shelf = new BookShelf();
           rank = 0;
       }
       public Book(string _name, string _author, string _description, string _filename)
       {
           name = _name;
           author = _author;
           publisher = "";
           publishYear = 0;
           description = _description;
           filename = _filename;
           category = new BookCategory();
           shelf = new BookShelf();
           rank = 0;
       }
       #endregion
       #endregion
       #region properties
       public int ID
       {
           get { return id; }
           set { id = value; }
       }
       public string Name
       {
           get { return name; }
           set { name = value; }
       }
       public string Author
       {
           get { return author; }
           set { author = value; }
       }
       public BookCategory Category
       {
           get { return category; }
           set { category = value; }
       }
       public BookShelf Shelf
       {
           get { return shelf; }
           set { shelf = value; }
       }
       public string Publisher
       {
           get { return publisher; }
           set { publisher = value; }
       }
       public int PublishYear
       {
           get { return publishYear; }
           set { publishYear = value; }
       }
       public string Description
       {
           get { return description; }
           set { description = value; }
       }
       public string Filename
       {
           get { return filename; }
           set { filename = value; }
       }
       public byte Rank
       {
           get { return rank; }
           set { rank = value; }
       }
       #endregion
       #region methods
       #endregion

   }
}
